import React from 'react';
import * as PropTypes from 'prop-types'

import {Util} from '..';
import {MapContext} from '../Context';
import * as controlFactory from 'ol/control';

class FullScreen extends React.Component {
  static defaultProps = {

  };
  constructor(props) {
    super(props);
    this.state = {

    };
    this.options = {
      className: undefined,
      label: undefined,
      labelActive: undefined,
      tipLabel: undefined,
      keys: undefined,
      target: undefined,
      source: undefined
    }
    this.control = new controlFactory.FullScreen()
  }

  componentDidMount() {
    this.init();
  }
  init = () => {
    Util.updateOptions(this.options,this.props)
    this.control = new controlFactory.FullScreen(this.options)
    this.context.mapComp.controls.push(this.control)
  };

  render() {
    return null;
  }
}
FullScreen.propTypes = {

}
FullScreen.contextType = MapContext;
export default FullScreen;

